#ifndef AED_ARCHTYPE_H
#define AED_ARCHTYPE_H

#include "aed_keyboardcomp.h"
#include "aed_rendercomp.h"
#include "aed_physicscomp.h"
#include "aed_alwayscomp.h"
#include "aed_mousecomp.h"
#include "aed_particlesystemcomp.h"
#include "aed_particlecomp.h"
#include "aed_soundcomp.h"
#include "aed_trigger.h"
#include "aed_attribute.h"

#include <QtGui>
#include <QList>
#include <QTextStream>
#include <QDomDocument>
#include "scriptmodel.h"

using namespace std;
class AED_Archtype
{
    QString m_name;

    AED_RenderComp m_rendercomp;
    AED_KeyboardComp m_keyboardcomp;
    AED_PhysicsComp m_physicscomp;
    AED_AlwaysComp m_alwayscomp;
    AED_MouseComp m_mousecomp;
    AED_ParticleSystemComp m_parsyscomp;
    AED_ParticleComp m_particlecomp;
    AED_SoundComp m_soundcomp;

    QList<AED_Trigger> m_triggers;
    QList<AED_Attribute> m_attributes;



public:
    AED_Archtype(const QString &name);
    AED_Archtype(const AED_Archtype &arch);

    QString GetName() const;
    void SetName(const QString &name);

    AED_RenderComp* GetRenderComp();
    AED_KeyboardComp* GetKeyboardComp();
    AED_PhysicsComp* GetPhysicsComp();
    AED_AlwaysComp* GetAlwaysComp();
    AED_MouseComp* GetMouseComp();
    AED_SoundComp* GetSoundComp();
    AED_ParticleSystemComp* GetParSysComp();
    AED_ParticleComp* GetParticleComp();

    QList<AED_Trigger>* GetTriggers(){return &m_triggers;}
    QList<AED_Attribute>* GetAttributes(){return &m_attributes;}

    AED_Archtype& operator=(const AED_Archtype &arch);


    void Save(QTextStream &file);
    void Save(QDomDocument &doc, QDomElement &header);
    bool Load(QDomElement &aelem, ImageManager &imgmngr, ScriptModel &scrmdl);
};

#endif // AED_ARCHTYPE_H
